package mspbots.cw.client.core.data;

import mspbots.cw.common.QueryParams;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
 * mspbots.data.cw.core.TicketsService
 *
 * @author <a href="https://github.com/vnobo">Alex bob</a>
 * @date Created by 2020/8/4
 */
public interface BaseApiService extends BaseSyncService {

    /**
     * query find all entity
     *
     * @param tenantId    tenant id
     * @param queryParams query find params
     * @param <T>         return entity class type
     * @return all page model
     */
    <T> Flux<T> find(Long tenantId, QueryParams queryParams);

    /**
     * query find all entity count
     *
     * @param tenantId    tenant id
     * @param queryParams count  params
     * @param <T>         return entity class type
     * @return count return model
     */
    <T> Mono<T> count(Long tenantId, QueryParams queryParams);


}
